package org.hqmdev.singleton;

/**
 * Bill Pugh Singleton
 * Advantage: using private inner static class that contains the instance of
 * the singleton class without synchronization
 * @author hqm2zxy
 *
 */
public class BillPughSingleton {
	
	private BillPughSingleton() {}
	
	private static class SingletonHolder {
		public static final BillPughSingleton INSTANCE = 
				new BillPughSingleton();
	}
	
	public static BillPughSingleton getInstance() {
		return SingletonHolder.INSTANCE;
	}
}
